import 'package:flutter/material.dart';
import 'package:test1/bean/Info.dart';
import 'package:test1/bean/Person.dart';

class Dart_Class_Page extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("类"),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: _test,
          child: Text("click"),
        ),
      ),
    );
  }

  void _test() {
    var person = Person("zhagnsan", 20, 0);
    print(person.age);
    person.age = 10;
    print(person.age);

    var info = Info("lisi", 20, "abc");
    print("泛型使用：" + info.member1);
    print("泛型使用：${info.member2}");
    print("泛型使用："  "${info.member3}");//奇葩的字符串连接方式，竟然可以使用空格
  }
}